<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta http-equiv="X-UA-Compatible" content="ie=edge" />
    <title>Document</title>
  </head>
  <body>
    <script type="text/javascript" src="../dist/index.js"></script>
    <script type="text/javascript">
      console.log(Calc.add(0.1, 0.2));

      function test(testTimes) {
        let i = 0;
        while (i < testTimes) {
          let testArr = [
            parseInt(Math.random() * 10),
            -parseInt(Math.random() * 10),
            parseFloat(Math.random() * 10).toFixed(2),
            -parseFloat(Math.random() * 10).toFixed(2)
          ];
          let r1 = parseInt(Math.random() * testArr.length);
          let r2 = parseInt(Math.random() * testArr.length);
          console.log(
            `${testArr[r1]} + ${testArr[r2]} = ${Calc.add(
              testArr[r1],
              testArr[r2]
            )}`
          );
          i++;
        }
      }
      test(100);
    </script>
  </body>
</html>
